import type { userInfo } from '@/types/login'
import type { LoginRes } from '@/types/user'
import { request } from '@/utils/request'

// 登录
export const loginAPI = (data: object) => {
  return request<LoginRes>('/v1_0/authorizations', 'POST', data)
}

// 获取用户信息
export const getUserInfoApI = () => {
  return request<userInfo>('/v1_0/user/profile', 'GET')
}
